<template>
	<view>
		<view class="status-section" :style="{background:orderStatus.color}">
			<text class="iconfont" :class="orderStatus.icon"></text>
			<text class="label-text" >{{orderStatus.text}}</text>
		</view>
		
		<!--商品信息-->
		<view class="product-section">
			<view class="product-header b-b">
				<text class="name">商品信息</text>
			</view>
			<!-- 商品列表 -->
			<view class="product-list" v-for="(item, index) in orderItemEntityList" :key="item.id" @click="navToDetailPage(item)">
				<product-order :item="item"></product-order>
			</view>
		</view>
		
		<!-- 订单明细 -->
		<view class="yt-list">
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">订单编号</text>
				<text class="cell-tip">{{order.orderSn}}</text>
			</view>
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">提交时间</text>
				<text class="cell-tip">{{order.createTime | formatDateTime}}</text>
			</view>
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">支付方式</text>
				<text class="cell-tip">{{order.payType | formatPayType}}</text>
			</view>
			<view class="yt-list-cell b-b">
				<text class="cell-tit clamp">商品合计</text>
				<text class="cell-tip red">￥{{order.totalAmount}}</text>
			</view>
			<view class="yt-list-cell b-b" v-if="order.status==1">
				<text class="cell-tit clamp">实付金额</text>
				<text class="cell-tip red">￥{{order.totalAmount}}</text>
			</view>
			<view class="yt-list-cell b-b" v-if="order.status==1">
				<text class="cell-tit clamp">付款时间</text>
				<text class="cell-tip">{{order.payTime | formatDateTime}}</text>
			</view>
		</view>
	</view>
</template>

<script src = "./detail.js"></script>

<style lang="scss" src = "./detail.scss"></style>
